package com.ncloud.crm.service.impl;

import com.ncloud.crm.entity.BsCloudIpseg;
import com.ncloud.crm.mapper.BsPublicCloudIpsegMapper;
import com.ncloud.crm.service.BsPublicCloudSegService;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by shiqiang on 2017/4/17.
 */
@Service
public class BsPublicCloudSegServiceImpl implements BsPublicCloudSegService {
	private static final Logger logger = LogManager.getLogger(BsPublicCloudSegServiceImpl.class);
	@Autowired
	private BsPublicCloudIpsegMapper bsPublicCloudIpsegMapper;
	@Override
	public int insertNodeCloudSeg(BsCloudIpseg bsCloudIpseg) {
		return bsPublicCloudIpsegMapper.insertCloudSeg(bsCloudIpseg);
	}

	@Override
	public int updateNodeCloudSeg(BsCloudIpseg bsCloudIpseg) {
		return bsPublicCloudIpsegMapper.updateNodeCloud(bsCloudIpseg);
	}

	@Override
	public List<BsCloudIpseg> getCloudIpSegByCloudId(Long cloudId) {
		return bsPublicCloudIpsegMapper.getCloudSegByCloudId(cloudId);
	}
}